#类型转换
#字符串类型转化为整型
str_num = "42"
int_num = int(str_num)
print(int_num)  # 输出 42

#字符串类型转化为浮点型，带小数
str_num = "3.14"
float_num = float(str_num)
print(float_num)  # 输出 3.14

#整型、浮点型转化为字符串类型
str_num = str(int(clock.fps()))
print(str_num)

str_num = str(round(clock.fps(), 4))#round()函数为四舍五入函数，4为保存小数点几位
print(str_num)

str_num = "{:.4f}".format(clock.fps())
print(str_num)


